<?php

use think\facade\Route;
use think\middleware\AllowCrossDomain;
use think\middleware\CheckRequestCache;
use think\middleware\SessionInit;

$middleware = [
    //     全局请求缓存
//    CheckRequestCache::class,
//     Session初始化
    SessionInit::class,
    AllowCrossDomain::class
];

Route::group("merchant", function () {
    Route::post("login", "merchant.account/login");
})->middleware($middleware);

Route::group("merchant", function () {
    Route::get("account_detail", "merchant.account/detail");
    Route::post("modify_password", "merchant.account/modify");
    Route::post("confirm", "merchant.order/confirm");
    Route::get("order_list", "merchant.order/lst");
    Route::get("order_index", "merchant.order/index");
    Route::get("order_detail", "merchant.order/detail");
})->middleware(array_merge([\app\middleware\StationMiddleware::class], $middleware));
